'use strict';
module.exports = (opt = {}) => {
    return async (ctx, next) => {
        if (ctx.author) {
            if (await ctx.service.application.visitor(ctx.author.code_id, ctx.url)) {
                return await next();
            }
            throw new Error('应用没有访问该路由的权限')
        }

    };
};
